package com.eastjet.equipment.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.eastjet.equipment.service.DeviceClassService;
import com.eastjet.maintenance.domain.DeviceClass;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@RestController
@RequestMapping("/class")
public class DeviceClassController {
    @Autowired
    private DeviceClassService deviceClassService;
   @GetMapping("/classList")
    public Page<DeviceClass> classList(@RequestParam(defaultValue = "") int page,
                                       @RequestParam(defaultValue = "") int size,
                                       @RequestParam(defaultValue = "") String condition){
       System.out.println("classPage:"+page);
       System.out.println("classSize:"+size);
       System.out.println("classCondition:"+condition);
       return deviceClassService.getClassList(page, size, condition);
    }
}
